﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Services;
using Entities;
using WebUI.Models;

namespace WebUI.Controllers
{
    public partial class StatisticsController : Controller
    {
        #region Member Variables

        readonly IAuditedOperationsService _filesService;
        readonly FilterOperations _filter;

        #endregion

        #region Constructor

        public StatisticsController(IAuditedOperationsService filesService, FilterOperations filter)
        {
            this._filesService = filesService;
            this._filter = filter;
        }

        #endregion

        public virtual ViewResult StorageHosts()
        {
            var model = new FilesModel();
            model.FilesList = _filesService.SearchOffHours(_filter);
            ViewBag.Name = Resources.StorageHostsTitle;
            return View(MVC.Reports.Statistics.Views.StorageHosts, model);
        }

        //[HttpPost]
        //[ActionName("StorageHosts")]
        //public virtual PartialViewResult FilterStorageHosts(FormCollection formCollection)
        //{
        //    Common.PopulateFilter(formCollection, filter);
        //    var results = filesService.SearchOffHours(filter);
        //    return PartialView(MVC.Statistics.Views._RenamesGrid, results);
        //}

    }
}
